package com.heima.admin.service.Impl;

import com.heima.admin.service.SensitiveManagementService;
import com.heima.api.admin.IWmNewsClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class SensitiveManagementServiceImpl implements SensitiveManagementService {

   private final IWmNewsClient wmNewsClient;

   @Override
   public ResponseResult select(WmSensitiveDto sensitiveDto) {

      return wmNewsClient.list(sensitiveDto);
   }

   @Override
   public void sensitiveWord(WmSensitive wmSensitive) {
      wmNewsClient.save(wmSensitive);
   }

   @Override
   public void updateSensitive(WmSensitive wmSensitive) {
      wmNewsClient.update(wmSensitive);
   }

   @Override
   public void delete(Integer id) {
      wmNewsClient.delete(id);
   }
}
